//
//  WSVideoCell.m
//  CharonTVProject
//
//  Created by karong on 2023/7/31.
//

#import "WSVideoCell.h"
#import "UIView+WSDraw.h"

@interface WSVideoCell ()

@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UIButton *tagBtn;

@end

@implementation WSVideoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.tagBtn setupRoundedCornersWithCutCorners:(~UIRectCornerTopRight) withRadii:CGSizeMake(8, 8)];
}

- (void)setDataWithObject:(WSVideo *)object {
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:object.cover]];
    self.titleLabel.text = object.title;
    self.descLabel.text = object.intro;
    self.tagBtn.hidden = object.pay_type != 1;
}

@end
